<template>
    <div class="person">
        <h1>sum的值是：{{ sum }}</h1>
        <button @click="add">点我+1</button>
    </div>
    <hr>
    <img v-for="(addr ,index) in images" :src="addr" :key="index" />
    <br/>
    <button @click="getDog">添加小狗</button>
</template>

<script setup lang="ts" name="Person">
    import useSum from '@/hooks/useSum'
    import useDog from '@/hooks/useDog'
    const {images,getDog} = useDog()
    const {sum,add} = useSum()

</script>

<style scoped>
.person {
    background-color: skyblue;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
}

img{
    width: 100px;
    margin-right: 20px;
}
</style>